<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
session_start();
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta charset="utf-8">
  <!-- Title and other stuffs -->
  <title>Login</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="author" content="">

  <!-- Stylesheets -->
  <link href="../style/bootstrap.css" rel="stylesheet">
  <link rel="stylesheet" href="../style/font-awesome.css">
  <link href="../style/style.css" rel="stylesheet">
  <link href="../style/bootstrap-responsive.css" rel="stylesheet">
  
  <!-- HTML5 Support for IE -->
  <!--[if lt IE 9]>
  <script src="js/html5shim.js"></script>
  <![endif]-->

  <!-- Favicon -->
  <link rel="shortcut icon" href="img/favicon/favicon.png">
</head>

<body>
<div>
	<?php
	if(isset($_SESSION['err'])) {
		echo $_SESSION['err'];
		session_destroy();
	}
	else if(isset($_SESSION['logged_in'])){
		if ($_SESSION['ID_ROLE'] == 4){
			header("view/index.php");
		}
		else{
			header("../ad/view/index.php");
		}
	}
	?>
	
	
</div>

<!-- Form area -->
<div class="admin-form">
  <div class="container-fluid">

    <div class="row-fluid">
      <div class="span12">
        <!-- Widget starts -->
            <div class="widget wred">
              <!-- Widget head -->
              <div class="widget-head">
                <i class="icon-lock"></i> Login 
              </div>

              <div class="widget-content">
                <div class="padd">
                  <!-- Login form -->
                  <form class="form-horizontal" method="post" action="controller/login.php">
                    <!-- Email -->
                    <div class="control-group">
                      <label class="control-label" for="inputNIP">Username</label>
                      <div class="controls">
                        <input type="text" name="NIP" placeholder="Username">
                      </div>
                    </div>
                    <!-- Password -->
                    <div class="control-group">
                      <label class="control-label" for="inputPassword">Password</label>
                      <div class="controls">
                        <input type="password" id="inputPassword" name="pass" placeholder="Password">
                      </div>
                    </div>
                    <!-- Remember me checkbox and sign in button -->
                    <div class="control-group">
                      <div class="controls">
                        <button type="submit" class="btn btn-primary">Masuk</button>
                        <button type="reset" class="btn">Batal</button>
                      </div>
                    </div>
                  </form>

            <!--   </div>
              </div>
                <div class="widget-foot">
                  Not Registred? <a href="#">Register here</a>
                </div>
            </div> -->  
      </div>
    </div>
  </div> 
</div>
	
		

<!-- JS -->
<script src="js/jquery.js"></script>
<script src="js/bootstrap.js"></script>
</body>
</html>
